package pojo;

/**
 * WuuserId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class WuuserId implements java.io.Serializable {

	// Fields

	private Persion persion;
	private Workunit workunit;

	// Constructors

	/** default constructor */
	public WuuserId() {
	}

	/** full constructor */
	public WuuserId(Persion persion, Workunit workunit) {
		this.persion = persion;
		this.workunit = workunit;
	}

	// Property accessors

	public Persion getPersion() {
		return this.persion;
	}

	public void setPersion(Persion persion) {
		this.persion = persion;
	}

	public Workunit getWorkunit() {
		return this.workunit;
	}

	public void setWorkunit(Workunit workunit) {
		this.workunit = workunit;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof WuuserId))
			return false;
		WuuserId castOther = (WuuserId) other;

		return ((this.getPersion() == castOther.getPersion()) || (this
				.getPersion() != null
				&& castOther.getPersion() != null && this.getPersion().equals(
				castOther.getPersion())))
				&& ((this.getWorkunit() == castOther.getWorkunit()) || (this
						.getWorkunit() != null
						&& castOther.getWorkunit() != null && this
						.getWorkunit().equals(castOther.getWorkunit())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getPersion() == null ? 0 : this.getPersion().hashCode());
		result = 37 * result
				+ (getWorkunit() == null ? 0 : this.getWorkunit().hashCode());
		return result;
	}

}